import request from '@/utils/request'

export function fetchTreeTableList(data) {
  return request({
    url: '/test/treeTable/TreeTable/list',
    method: 'get',
    data
  })
}

export function getTreeTable(id) {
  return request({
    url: '/test/treeTable/TreeTable/detail/' + id,
    method: 'get',
    params: { id }
  })
}

export function createTreeTable(data) {
  return request({
    url: '/test/treeTable/TreeTable/add',
    method: 'post',
    data
  })
}

export function updateTreeTable(data) {
  return request({
    url: '/test/treeTable/TreeTable/update',
    method: 'put',
    data
  })
}

export function deleteTreeTable(ids) {
  return request({
    url: '/test/treeTable/TreeTable/delete',
    method: 'delete',
    data: ids
  })
}
